<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
<title>micrsearchresults</title>
<style type="text/css" media="all">
@import "h2hstyle.css";
</style>
</head>

<!-- header -->

<?php
 
include 'h2hheader.php';

?>

<?php
   $con = mysql_connect("50webs.biz","meeenals_h2h","tr1ta");
  if (!$con){
	die('Could not connect: ' . mysql_error());
	}
  $db_found = mysql_select_db ("meeenals_h2h");
  if ($db_found) {
    
    echo $db_found;
	$bankname =trim(mysql_real_escape_string($_POST['bank_name']),"  " );
	$bankcity =trim(mysql_real_escape_string($_POST['bank_city']),"  " );
	$branchname =trim(mysql_real_escape_string($_POST['bank_branch']),"  " );
	
	
	$SQL = "SELECT * FROM micr_code where bank_name like '$bankname%' 
	AND bank_city like '$bankcity%' 
	AND branch_name like '%$branchname%'";	
	
	
	$result = mysql_query($SQL);
	// find out the number of columns in result 
	$column_count = mysql_num_fields($result) ;
	

	// Check result
	// This shows the actual query sent to MySQL, and the error. Useful for debugging.
	if (!$result) {
		$message  = 'Invalid query: ' . mysql_error() . "\n";
		$message .= 'Whole query: ' . $query;
		die($message);
	}
	 $num_rows = mysql_num_rows($result);
			
			$error = mysql_error();
			echo $error;
			
			
	// Here the table attributes from the $table_params variable are added 
	
	print("<TABLE $table_params >\n"); 
	echo "<table border='1'>"; 
	print("<TR>"); 
	for ($column_num = 0; $column_num < $column_count; $column_num++) { 
		$field_name = 
		mysql_field_name($result, $column_num); 
		print("<TH>$field_name</TH>"); 
	} 
	print("</TR>\n"); 
	// print the body of the table 
	while ($row = mysql_fetch_row($result)) { 
		print("<TR>"); 
		for ($column_num = 0; 
		$column_num < $column_count; 
		$column_num++) { 
			print("<TD>$row[$column_num]</TD>\n"); 
		} 
		print("</TR>\n"); 
	} 
	print("</TABLE>\n"); 
	mysql_close($con);
	} 
	else {
		print "Database NOT Found ";
		mysql_close($con);
	}
	
	
	
	?>
	
	
	<body>
			
	</body>
	
	<!-- Footer -->

<?php
 
include 'h2hfooter.php';

?>
	</html>
